import requests

i = input("请输入要翻译的字符：")
form = {"kw":i}

#网络请求
url = "https://fanyi.baidu.com/sug"
headers = {
    'User-Agent':'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6'
}
resp = requests.post(url,headers=headers,data=form)
result = resp.json()
for d in result["data"]:
    print("{}===={}".format(d["k"],d["v"]))
